<template>
  <a-config-provider :locale="locale">
    <div id="app">
      <router-view />
    </div>
  </a-config-provider>
</template>
<script>
import zhCN from 'ant-design-vue/lib/locale-provider/zh_CN'
import enquireScreen from '@/utils/device'

export default {
  data() {
    return {
      locale: zhCN,
    }
  },
  created() {
    let that = this
    enquireScreen((deviceType) => {
      // tablet
      if (deviceType === 0) {
        that.$store.commit('TOGGLE_DEVICE', 'mobile')
        that.$store.dispatch('setSidebar', false)
      }
      // mobile
      else if (deviceType === 1) {
        that.$store.commit('TOGGLE_DEVICE', 'mobile')
        that.$store.dispatch('setSidebar', false)
      } else {
        that.$store.commit('TOGGLE_DEVICE', 'desktop')
        that.$store.dispatch('setSidebar', true)
      }
    })
  },
}
</script>
<style lang="less">
#app {
  height: 100%;
}
.w-textarea_input{
  line-height: 2 !important;
}
.w-textarea wise {
  border: 1px solid #1890FF;
  padding: 5px 8px !important;
  border-radius: 4px;
  transition: all 0.3s;
  font-size: 16px;
  margin: 0 6px;
  color: #1890FF !important;
  background: #e6f7ff; 
  pointer-events:none;
}
.select-data-slot {
  .ant-checkbox-group-item {
    margin-top: 10px !important;
  }
}
</style>